package org.myxdb.server.message;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.myxdb.core.database.database;

public class ListDB implements RPCMessage{

	 public Map execute(Map message) {
		 
		 String dbname = (String)message.get("dbname");
		 
		 Map result = new HashMap(); 
		 List list = new database().listdb();
		 for(int i=0;i<list.size();i++)
		 {
			 
			 
			 result.put("dbname"+i, list.get(i));
			 
			 
		 }
		 return result;
	 }
}
